-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Tests unique_within_region with class that uses STI #16740
Conversation
9863187
to
2e8e038
Compare
2e8e038
to
b7dc603
Compare
@miq-bot add_label core |
context "two pxe templates" do | ||
it "raises error with non-unique names" do | ||
expect { @template = FactoryGirl.create(:customization_template, :name => "template") }.to_not raise_error | ||
expect { @template1 = FactoryGirl.create(:customization_template, :name => @template.name) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@template1
is not used. You can remove.
b8e33d0
to
2ad96cd
Compare
b04a4e9
to
ec2aaf4
Compare
No, but I would expect that creating two separate leaf classes with the same name should probably fail the uniqueness check as well. |
5c2adef
to
093b3f5
Compare
093b3f5
to
4d907dd
Compare
4d907dd
to
b8402fa
Compare
Checked commit d-m-u@b8402fa with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
This addresses a concern that the CustomizationTemplate class uses STI and thus the unique_within_region validation (that currently uses record.class) being applied to it may not properly scope across leaf classes. The suggestion was to use record.class.base_class instead.
Depends on
#16775